/**
 *@title
 *@author huahuadavids
 *@date 2020/4/12
 */

import * as types from "../types"

export default {
  addTodo(text) {
    return {
      type: types.ADD_TODO,
      text
    }
  },
  delTodo(index) {
    return {
      type: types.DEL_TODO,
      index
    }
  },
  toggleTodo() {
    return {
      type: types.TOGGLE_TODO,
      index: 1
    }
  },
}
